package net.csdn.business.common.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import net.csdn.business.common.constant.CommonConstants;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author wanghang
 * @version 1.0
 * @date 2022/8/24 11:37
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class EventDataIssueVo implements Serializable {

    private String action;
    private String actionName;

    @JsonProperty(value = "object_kind")
    @SerializedName(value = "object_kind")
    private String objectKind;

    @JsonProperty(value = "created_at")
    private String createdAt;
    private EventProjectVo project;

    private Issue issue;

    @Data
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public static class Issue {

        private String id;
        private String iid;
        private String url;
        private String action;
        private String state;
        private String author_id;
        private String title;
        private String description;

        @JsonProperty(value = "created_at")
        @SerializedName(value = "created_at")
        @JsonFormat(pattern = CommonConstants.DEFAULT_PATTERN, timezone = CommonConstants.DEFAULT_TIMEZONE)
        private String createdAt;

        @JsonProperty(value = "updated_at")
        @SerializedName(value = "updated_at")
        @JsonFormat(pattern = CommonConstants.DEFAULT_PATTERN, timezone = CommonConstants.DEFAULT_TIMEZONE)
        private String updatedAt;

    }

}
